<!--{template header}-->
<div class="c_header a_header">
	<a href="space.php?uid=$space[uid]"><!--{avatar($space[uid],small)}--></a>
	<h1>友情链接</h1>
	<a href="space.php?uid=$space[uid]" class="spacelink">我的空间</a>
</div>
<div class="tabs_header">
	<ul class="tabs">
	<li class="active"><a href="space.php?uid=$space[uid]&do=mylink&action=all"><span>大家的链接</span></a></li>
	<li$actives[me]><a href="space.php?uid=$space[uid]&do=mylink&action=me"><span>我的链接</span></a></li>
	<li$actives[sort]><a href="space.php?uid=$space[uid]&do=mylink&action=sort"><span>链接排序</span></a></li>
	<li class="null"><a href="space.php?uid=$space[uid]&do=mylink&action=insert">添加新链接</a>
	</ul>
</div>


<div id="content" style="width:640px;">
  <span> $smulti</span>
<!--{if $_GET['action'] == 'all'}-->
<table padding="5" marging="5">
   <tr>
     <th>编号</th>
     <th>用户UID</th>
     <th>用户名</th>
     <th>链接名</th>
	 <td>链接地址</td>
   </tr>
  <!--{loop $list $key $value}-->
   <tr>
     <td>$value[id]</td>
     <td>$value[uid]</td>
     <td>$value[username]</td>
     <td><a href="$value[url]">$value[name]</a></td>
	 <td><a href="$value[url]">$value[url]</a></td>
   </tr>
  <!--{/loop}-->
  </table>
 
  <!--{elseif $_GET['action'] == 'insert'}-->

   <form name="department" method="post" action="space.php?uid=$space[uid]&do=mylink&action=add">   
      <span>链接名称:</span>
	  <input name="name" type="text" size="30"></br>
	  <span>链接地址:</span>
	  <input name="url"  type="text" size="30"></br>
	  <input name="" type="submit" value="添加">
   </form>
  

  <!--{elseif $_GET['action'] == 'sort'}-->
  <form  name="sort" method="post" action="space.php?uid=$space[uid]&do=mylink&action=cp_sort">   
  排序字段:<SELECT NAME="fieldname" >
					<OPTION VALUE="id" SELECTED>链接ID</OPTION>
					<OPTION VALUE="uid">用户ID</OPTION>
					<OPTION VALUE="username" SELECTED>用户名</OPTION>
					<OPTION VALUE="name">链接名</OPTION>
		  </SELECT>
  排序方式:<SELECT NAME="sortname">
					<OPTION VALUE="ASC" SELECTED>升序</OPTION>
					<OPTION VALUE="DESC">降序</OPTION>
		  </SELECT>
		  <input type="submit" value="排序">
  </form>         
  <!--{elseif $_GET['action'] == 'cp_sort'}-->
   <span> $smulti</span>
 <table padding="5" marging="5">
   <tr>
     <th>编号</th>
     <th>用户UID</th>
     <th>用户名</th>
     <th>链接名</th>
	 <td>链接地址</td>
   </tr>
  <!--{loop $list $key $value}-->
   <tr>
     <td>$value[id]</td>
     <td>$value[uid]</td>
     <td>$value[username]</td>
     <td><a href="$value[url]">$value[name]</a></td>
	 <td><a href="$value[url]">$value[url]</a></td>
   </tr>
  <!--{/loop}-->
  <span> $multi</span>

  <!--{else}-->

  其他操作
  

 <!--{/if}-->
 </table>
  
  
  
</div>


<div class="f_status s_clear">
	<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</div>
<!--{template footer}-->